package com.boot.config;

import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer;


public class WebAppInit extends AbstractAnnotationConfigDispatcherServletInitializer {
    //这里放容器类配置的位置
    @Override
    protected Class<?>[] getRootConfigClasses() {
        return new Class[]{ DataSourceJavaConfig.class, MapperJavaConfig.class, ServiceJavaConfig.class};
    }

    //这里只放web的ioc配置
    @Override
    protected Class<?>[] getServletConfigClasses() {
        return new Class[]{WebMvcJavaConfig.class};
    }

    @Override
    protected String[] getServletMappings() {
        return new String[]{"/"};
    }
}
